# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=tokodon
pkgver=24.02.2
pkgrel=0
pkgdesc="A Mastodon client for Plasma and Plasma Mobile"
url="https://invent.kde.org/network/tokodon/"
# armhf blocked by extra-cmake-modules
# riscv64, ppc64le, s390x: blocked by proposals
arch="all !armhf !riscv64 !ppc64le !s390x"
license="GPL-3.0-only AND CC0-1.0"
depends="
	kirigami
	kirigami-addons
	purpose
	qqc2-desktop-style
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	mpvqt-dev
	purpose-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qt6-qtwebsockets-dev
	qt6-qtwebview-dev
	qtkeychain-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/network/tokodon.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/tokodon-$pkgver.tar.xz"
# No tests
options="!check"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a0af63e1571a80f31823598645cd184797889ecf98cae5ba0663056c2f019d02562430f3026e8aef2553964b33aae459499e26e9b9f6d65b89202ef19baa4bb7  tokodon-24.02.2.tar.xz
"
